package com.dacong.nezha.utils;

import cn.hutool.core.date.DateUtil;
import cn.hutool.json.JSONUtil;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

public class Request {

    public static Map<String,Object> createBody(String url,String method,String body,String token){
        Map<String,Object> bodyMap = new HashMap<>();
        bodyMap.put("url",url);

        Map<String, Object> options = new HashMap<>();
        options.put("method",method);
        options.put("body",body);

        Map<String,String> headers = new HashMap<>();
        headers.put("Content-Type","application/json");
        headers.put("Authorization",token);
        headers.put("Language","zh-CN");
        options.put("headers",headers);
        bodyMap.put("options",options);
        return bodyMap;
    }

}
